﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace MapEntities
{
    [Serializable] 
    public enum Mode
    {
          Road,Aerial,AerialWithLabels,MercatorMode
    }

    [DataContract]   
    [Serializable] 
    public class SilverlightMapProperties
    {
        public bool ShowVirtualEarthMap { get; set; } //?
        public bool ShowNavigationControls { get; set; }
        public string Width { get; set; }
        public string Height { get; set; }
        public Mode BackgroundMode { get; set; }
        public double ZoomLevel { get; set; }
        public GeoPoint Center { get; set; }        
        public bool MouseWhellZoom { get; set; }
        public bool CopyrightVisible { get; set; }
        public bool LogoVisible { get; set; }
        public bool ScaleVisible { get; set; }
        public string BingMapKeY { get; set; }

        public SilverlightMapProperties()
        {
            ZoomLevel = 4;
            ShowNavigationControls = true;
            MouseWhellZoom = true;
            CopyrightVisible = true;
            LogoVisible = true;
            ScaleVisible = true;
            Width = "100%";
            Height = "100%";
            Center = new GeoPoint();
        }
        private List<Layer> layers = null;

        [DataMember]
        public List<Layer> Layers
        {
            get
            {
                if (layers == null)
                    layers = new List<Layer>();
                return layers;
            }
            set
            {
                layers = value;
            }
        }
    }
}
